<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@ include file="../include/taglib.inc"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edit</title>
<style type="text/css">
table {
	border: 1px solid black;
	border-collapse: collapse;
	width: 500px;
}

table tr td {
	border: 1px solid black;
	padding: 3px;
}
</style>
</head>
<body>
    <h2>
        <s:if test="null == model">
            Add model
        </s:if>
        <s:else>
            Edit model
        </s:else>
    </h2>
    <s:form action="test_save" namespace="/template">
        <table>
            <s:if test="null != model">
                <tr>
                    <td>Id</td>
                    <td>${model.id}<s:hidden name="model.id" /></td>
                </tr>
            </s:if>
            <tr>
                <td>Name</td>
                <td><s:textfield name="model.name" /></td>
            </tr>
            <tr>
                <td>Age</td>
                <td><s:textfield name="model.age" /></td>
            </tr>
        </table>
        <s:submit />
    </s:form>
</body>
</html>